package Java_Test;

public class Keche extends Car{


    public Keche(String type, String brand, String idcard, int seat, double rent) {
        super(type, brand, idcard, seat, rent);
    }

    @Override
    public double discount(int days) {
       if (days>=3&&days<7){
           return days*this.getRent()*0.9;
       }else if (days>=7&&days<30){
           return days*this.getRent()*0.8;
       }else if (days>=30&&days<150){
           return days*this.getRent()*0.7;
       }else if( days>=150){
           return days*this.getRent()*0.6;
       }else{
           return days*this.getRent();
       }
    }
}
